package poliakov.spring.advertisement;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import poliakov.spring.advertisement.persistence.AdvertisementDao;
import poliakov.spring.advertisement.pojo.IAdvertisement;
import poliakov.spring.advertisement.pojo.ICategory;
import poliakov.spring.advertisement.pojo.ICity;

public class AdverticementServiceImpl implements AdvertisementService {
	
	@Autowired
	private AdvertisementDao dao;
	
	@Override
	public IAdvertisement getAadvertisement(int id) {
		return dao.getAadvertisementByID(id);
	}

	@Override
	public void addAdvertisement(IAdvertisement advertisement) {
		dao.addAdvertisement(advertisement);
	}

	@Override
	public ICity getCity(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void addCity(ICity city) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public ICategory getCategory(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void addCategory(ICategory category) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<IAdvertisement> getAllAds() {
		return dao.getAllAadvertisements();
	}

	@Override
	public List<ICity> getAllCityies() {
		return dao.getAllCityies();
	}

	@Override
	public List<ICategory> getAllCategories() {
		return dao.getAllCategories();
	}

}
